package com.innovation.chengzhangriji.ui.widget;

import android.media.Image;
import android.view.LayoutInflater;
import android.view.View;

import com.innovation.chengzhangriji.Config;
import com.innovation.chengzhangriji.R;
import com.makeramen.roundedimageview.RoundedImageView;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;

public class DiscoverCommentPhotoViewHolder extends DiscoverCommentViewHolder {

    private RoundedImageView mImage;

    public DiscoverCommentPhotoViewHolder(View itemView) {
        super(itemView);
        LayoutInflater.from(itemView.getContext()).inflate(R.layout.item_comment_photo, getContent());
        mImage = (RoundedImageView) itemView.findViewById(R.id.ico_photo);
    }

    // 设置第一张照片
    public void setPhotoUrl(String url) {
        ImageLoader.getInstance().displayImage(url, mImage, Config.getOptionsPhoto(), null);
    }
}
